package com.smartstate.IOC.controller;

import com.smartstate.IOC.service.ContributionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/Contribution")
@Api(tags = {"园区碳综合贡献"})
public class ContributionController {

    @Resource
    private ContributionService contributionService;

    @GetMapping("/total")
    @ApiOperation(value = "碳综合贡献比例")
    public Map<String, Integer> carbonTotal(){
        return contributionService.getCarbonTotal();
    }

    @GetMapping("/DataTotal")
    @ApiOperation(value = "碳综合贡献总值")
    public List<Map<String, Integer>> getDataTotal(){
      return   contributionService.getDataTotal();
    }

}
